@extends('front.public_layout.layout')


@section('style')
    <link rel="stylesheet" href="{{asset('/front/css/article.css')}}">
    <style>

    </style>
@endsection

@section('content')
    <div class="middle-content article">

        {{--    广告banner--}}
        @if ($banner_adv)
            <a class="index-adv" href="{{ $banner_adv->pc_url }}">
                <img src="{{ $banner_adv->adv_img_pc_url }}" alt="">
            </a>
        @endif

        <div class="article-details">
            <div class="article-header">
                <div class="title">{{ $article->region_info ? '【'.$article->region_info->region_name.'】' : '' }}{{ $article->article_title }}</div>
                <div class="auther inline-block">
                    {{ $article->created_at }} <span>来源：{{ $article->articles_author->name }}</span>
                </div>
                <div class="right">
                    <div class="zan">{{ $article->zan_num }}</div>
                    <div class="collect">{{ $article->collect_num }}</div>
                </div>
            </div>

            <div class="article-content">
                @if ($article->imgs_url)
                <div class="content-img">
                    @foreach ($article->imgs_url as $imgs_url_val)
                    <img src="{{ $imgs_url_val }}" alt="">
                    @endforeach
                </div>
                @endif

                {!! $article->content !!}
            </div>
        </div>

        <div class="right-content right">
            <div class="auther-info">
                <div class="head-img"><img src="{{ $article->articles_author->avatar_url }}" alt=""></div>
                <a href="{{ url('author/'.$article->articles_author->id.'/1') }}" class="a-name">{{ $article->articles_author->name }}发布</a>
                <div class="watch-btn" onclick="app_download_tip()">+  点击关注</div>
{{--                <div class="watch-btn watched">已关注</div>--}}

                <div class="auther-data clear">
                    <div class="item">
                        <div>{{ $authorArticleCount }}</div>
                        <div>文章</div>
                    </div>
                    <div class="item right">
                        <div>{{ $article->articles_author->fans_num }}</div>
                        <div>粉丝数</div>
                    </div>
                </div>
            </div>

            @if ($recommendArticle)
            <div class="xiangguan">
                <div class="title">相关文章</div>
                @foreach($recommendArticle as $recommendArticleVal)
                    <a class="item" href="{{ url('article/details/'.$recommendArticleVal->id) }}">
                        <div class="article-title">{{ $recommendArticleVal->region_info ? '【'.$recommendArticleVal->region_info->region_name.'】' : '' }}{{ $recommendArticleVal->article_title }}</div>
                        <div class="time"> {{ $recommendArticleVal->created_at }}</div>
                    </a>
                @endforeach

            </div>
            @endif
        </div>

    </div>

@endsection


@section('js')

    <script>


    </script>
@endsection